<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script type="text/javascript">
  
  console.log(a)
  var a = 'aaa'
  console.log(a)
  
  function fn() {
    console.log(b)
    var b = 'bbb'
    console.log(b)
  }
  fn()
  
  console.log(f1)
  console.log(f2)
  function f1() {}
  var f2 = function(){}
  
</script>

</body>
</html>